// index.js
// 获取应用实例
const app = getApp()

Page({
  data: {
    userInfo: {},
    hasUserInfo: false,
    canIUse: wx.canIUse('button.open-type.getUserInfo'),
    canIUseGetUserProfile: false,
    canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName'), // 如需尝试获取用户信息可改为false
    banners: ["advertise1", "advertise2"], // 轮播图的图片名
    grids: [ // 功能
      { name: '用户信息', icon: "../../source/image/g/g1.png", "url": "/pages/usermassage/usermessage" },
      { name: '信息查询', icon: "../../source/image/g/g2.png", "url": "/pages/messagecheck/messagecheck" },
      { name: '地图', icon: "../../source/image/g/g3.png", "url": "/pages/map/map" },
      { name: '信息更改', icon: "../../source/image/g/g4.png", "url": "/pages/change/change" },
      { name: '健康码录入', icon: "../../source/image/g/g5.png", "url": "/pages/intogo/intogo" },
      { name: '行程卡录入', icon: "../../source/image/g/g6.png", "url": "/pages/intohealth/intohealth" },
      { name: '更多功能', icon: "../../source/image/g/g7.png", "url": "/pages/more/more" }],
  },
  goTousermassage() {
    wx.navigateTo({
      url: 'pages/usermassage/usermessage',
    });
  },
  goTomessagecheck() {
    wx.navigateTo({
      url: 'pages/messagecheck/messagecheck',
    });
  },
  goTomap() {
    wx.navigateTo({
      url: 'pages/map/map',
    });
  },
  goTochange() {
    wx.navigateTo({
      url: 'pages/change/change',
    });
  },
  goTointogo() {
    wx.navigateTo({
      url: 'pages/intogo/intogo',
    });
  },
  goTointohealth() {
    wx.navigateTo({
      url: 'pages/intohealth/intohealth',
    });
  },
  goTomore() {
    wx.navigateTo({
      url: 'pages/more/more',
    });
  },

  // 事件处理函数
  bindViewTap() {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
  onLoad() {
  }
})
